package com.love.marriage.userLoginInfo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.love.marriage.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * description:  用户登录历史表类
 * author:       mybatisPlus
 * createDate: 2024-10-12 11:25:06
 * version:      1.0.0
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("user_login_info_t")
@Schema(description = "用户登录历史表")
public class UserLoginInfo extends BaseEntity<UserLoginInfo>{

    @Schema(description = "用户id", type = "Long", implementation = Long.class)
    @TableField("user_id")
    private Long userId;

    @Schema(description = "最后登录时间", type = "LocalDateTime", implementation = LocalDateTime.class)
    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;

    @Schema(description = "token在redis中对应的tokenId", type = "String", implementation = String.class)
    @TableField("token_id")
    private String tokenId;

    @Schema(description = "系统", type = "String", implementation = String.class)
    @TableField("os")
    private String os;

    @Schema(description = "登录浏览器", type = "String", implementation = String.class)
    @TableField("broswer")
    private String broswer;

    @Schema(description = "最后登录IP", type = "String", implementation = String.class)
    @TableField("login_ip")
    private String loginIp;

    @Schema(description = "修改人", type = "Long", implementation = Long.class)
    @TableField("updater")
    private Long updater;

    @Schema(description = "更新时间", type = "LocalDateTime", implementation = LocalDateTime.class)
    @TableField("update_time")
    private LocalDateTime updateTime;

    @Schema(description = "token信息", type = "String", implementation = String.class)
    @TableField("token")
    private String token;

    @Schema(description = "登录地址", type = "String", implementation = String.class)
    @TableField("login_location")
    private String loginLocation;

    @Schema(description = "来源", type = "String", implementation = String.class)
    @TableField("from_source")
    private String fromSource;
}
